#!/bin/bash
#PBS -N test
#PBS -V
#PBS -l nodes=4:ppn=8,walltime=3:00:00

. /opt/modules/Modules/3.2.6/init/bash
 module load intel openmpi
cd /lustre/home/mpotts/FEM/Regression.d/dsvm30
../create_mfiles.pl
echo mpirun -n 2 ../../bin/aeros  dsvm30_sparse_displmod.inp
mpirun -n 2 --machinefile host.0 ../../bin/aeros  dsvm30_sparse_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_skyline_displmod.inp
mpirun -n 2 --machinefile host.1 ../../bin/aeros  dsvm30_skyline_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_mumps_displmod.inp
mpirun -n 2 --machinefile host.2 ../../bin/aeros  dsvm30_mumps_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_spooles_displmod.inp
mpirun -n 2 --machinefile host.3 ../../bin/aeros  dsvm30_spooles_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_gmres_displmod.inp
mpirun -n 2 --machinefile host.4 ../../bin/aeros  dsvm30_gmres_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_spooles_pivot_displmod.inp
mpirun -n 2 --machinefile host.5 ../../bin/aeros  dsvm30_spooles_pivot_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_mumps_pivot_displmod.inp
mpirun -n 2 --machinefile host.6 ../../bin/aeros  dsvm30_mumps_pivot_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_pcg_displmod.inp
mpirun -n 2 --machinefile host.7 ../../bin/aeros  dsvm30_pcg_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_bcg_displmod.inp
mpirun -n 2 --machinefile host.8 ../../bin/aeros  dsvm30_bcg_displmod.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm30_cr_displmod.inp
mpirun -n 2 --machinefile host.9 ../../bin/aeros  dsvm30_cr_displmod.inp &
wait %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 
